From: Florian Müllner Date: Fri, 16 Nov 2018 10:39:08 +0000 (+0100) Subject: altSwitcher: Fix error when all alternatives are disabled X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~897^2~1^2~33 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e77463b875311ff35bb94daadf2d96cb1886e2c1;p=gnome-shell.git altSwitcher: Fix error when all alternatives are disabled While we do consider the case that we don't have a child to show for the visibility, we are still trying to move the click action unconditionally. https://gitlab.gnome.org/GNOME/gnome-shell/issues/783 --- diff --git a/js/ui/status/system.js b/js/ui/status/system.js index c695f37be..41bcacd94 100644 --- a/js/ui/status/system.js +++ b/js/ui/status/system.js @@ -58,6 +58,9 @@ var AltSwitcher = new Lang.Class({ childToShow = this._standard; } else if (this._alternate.visible) { childToShow = this._alternate; + } else { + this.actor.hide(); + return; } let childShown = this.actor.get_child(); @@ -79,7 +82,7 @@ var AltSwitcher = new Lang.Class({ global.sync_pointer(); } - this.actor.visible = (childToShow != null); + this.actor.show(); }, _onDestroy() {